package com.sumi.erp.service.impl;

import java.util.List;
import com.sumi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sumi.erp.mapper.BaseRealWarehouseMapper;
import com.sumi.erp.domain.BaseRealWarehouse;
import com.sumi.erp.service.IBaseRealWarehouseService;

/**
 * 实体仓库Service业务层处理
 * 
 * @author fgf67@163.com
 * @date 2024-06-27
 */
@Service
public class BaseRealWarehouseServiceImpl implements IBaseRealWarehouseService 
{
    @Autowired
    private BaseRealWarehouseMapper baseRealWarehouseMapper;

    /**
     * 查询实体仓库
     * 
     * @param id 实体仓库主键
     * @return 实体仓库
     */
    @Override
    public BaseRealWarehouse selectBaseRealWarehouseById(Long id)
    {
        return baseRealWarehouseMapper.selectBaseRealWarehouseById(id);
    }

    /**
     * 查询实体仓库列表
     * 
     * @param baseRealWarehouse 实体仓库
     * @return 实体仓库
     */
    @Override
    public List<BaseRealWarehouse> selectBaseRealWarehouseList(BaseRealWarehouse baseRealWarehouse)
    {
        return baseRealWarehouseMapper.selectBaseRealWarehouseList(baseRealWarehouse);
    }

    /**
     * 新增实体仓库
     * 
     * @param baseRealWarehouse 实体仓库
     * @return 结果
     */
    @Override
    public int insertBaseRealWarehouse(BaseRealWarehouse baseRealWarehouse)
    {
        baseRealWarehouse.setCreateTime(DateUtils.getNowDate());
        return baseRealWarehouseMapper.insertBaseRealWarehouse(baseRealWarehouse);
    }

    /**
     * 修改实体仓库
     * 
     * @param baseRealWarehouse 实体仓库
     * @return 结果
     */
    @Override
    public int updateBaseRealWarehouse(BaseRealWarehouse baseRealWarehouse)
    {
        return baseRealWarehouseMapper.updateBaseRealWarehouse(baseRealWarehouse);
    }

    /**
     * 批量删除实体仓库
     * 
     * @param ids 需要删除的实体仓库主键
     * @return 结果
     */
    @Override
    public int deleteBaseRealWarehouseByIds(Long[] ids)
    {
        return baseRealWarehouseMapper.deleteBaseRealWarehouseByIds(ids);
    }

    /**
     * 删除实体仓库信息
     * 
     * @param id 实体仓库主键
     * @return 结果
     */
    @Override
    public int deleteBaseRealWarehouseById(Long id)
    {
        return baseRealWarehouseMapper.deleteBaseRealWarehouseById(id);
    }
}
